import { defineConfig } from 'vite'
import path from "path"
import vue from '@vitejs/plugin-vue'


// https://vitejs.dev/config/ 查看配置选项
export default defineConfig({
  plugins: [vue()],
  server: {
    // 开发服务器选项
    host: '127.0.0.1',
    port: 3000,
    proxy: {
      '/api': {
        target: 'http://127.0.0.1:613',
        rewrite: (path) => path.replace(/^\/api/, '')
      },
    },
    build: {
      // 构建选项
    },
  },
  resolve: {
    alias: {
      '@': path.resolve(__dirname, 'src'),
    }
  }
})
